<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="app" tagdir="/WEB-INF/tags"%>
<app:page>
	<form action="${pageContext.request.contextPath}/admin/entry"
		method="post" class="form-horizontal" role="form">
		<c:if test="${!empty item.id}">
			<input type="hidden" name="id" value="${item.id}" />
		</c:if>
		<div class="form-group">
			<label for="poolId" class="col-sm-2 control-label">Pool</label>
			<div class="col-sm-10">
				<select class="form-control" id="poolId" name="poolId">
					<option value=""></option>
					<c:forEach var="pool" items="${pools}">
						<option value="${pool.id}"
							${pool.id eq item.poolId ? ' selected' : ''}>${pool.title}</option>
					</c:forEach>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="text1" class="col-sm-2 control-label">Text 1</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="text1" name="text1"
					value="${item.text1}">
			</div>
		</div>
		<div class="form-group">
			<label for="text2" class="col-sm-2 control-label">Text 2</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="text2" name="text2"
					value="${item.text2}">
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<button type="submit" class="btn btn-default" name="save"
					value="save">Save</button>
				<a class="btn btn-default"
					href="${pageContext.request.contextPath}/admin/entry">Cancel</a>
			</div>
		</div>
	</form>
</app:page>
